<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <include file="Public/title"/>
    <style type="text/css">
        .search {
            float: right;
            margin-right: 30px;
        }
    </style>
</head>
<body>
<div class="mainWrap">
    <div class="mainWrapBd">
        <div class="mainListTit">
            <h3>
                <a href="javascript:;" class="listSearchTit" data-default='0'>搜索/筛选借款[<span>展开</span>]</a>
            </h3>
            <a href="{:U('audit_add')}" class="btn btn_edit"><span>新增客户</span></a>
        </div>
        <form style="display:none;" class="listSearchBox" action="index" method="get">
            <div class="mainWrapSerach">
                请选择所属分公司：
                <select name="branch_company">
                    <option value="0">请选择所属分公司</option>
                    <option value="1">慕斯（深圳）</option>
                    <option value="2">慕斯（东莞）</option>
                </select>
                订单时间
                start:&nbsp&nbsp<input type="text" id="posttime1" class="sys_text ico-calendar" name="start_time"
                                       value=""/>&nbsp&nbsp
                <script type="text/javascript">
                    date = new Date();
                    Calendar.setup({
                        inputField: "posttime1",
                        ifFormat: "%Y-%m-%d",
                        showsTime: true,
                        timeFormat: "24"
                    });
                </script>
                to:&nbsp&nbsp<input type="text" id="posttime2" class="sys_text ico-calendar" name="end_time" value=""/>
                <script type="text/javascript">
                    date = new Date();
                    Calendar.setup({
                        inputField: "posttime2",
                        ifFormat: "%Y-%m-%d",
                        showsTime: true,
                        timeFormat: "24"
                    });
                </script>
                搜索关键字：
                <input type="text" class="sys_text" style="width:120px" name="real_name"
                       value="<if condition='$condition2[key] neq null'><{$condition2.key}></if>"/>
            </div>
            <table cellpadding="0" border="0" cellspacing="0" class="stdsearch">
                <tr>
                    <td>
                        <input type="submit" class="submit" value="搜 索" name="submit"/>
                    </td>
                </tr>
            </table>
        </form>
        <form action="{:U('batchDo')}" method="post" name="doForm" onsubmit="return batchConfirm(this);">
            <!--列表-->
            <table cellpadding="0" cellspacing="0" border="0" class="stdtable stdtablelist">
                <thead>
                <tr>
                    <th class="center">客户ID</th>
                    <th>客户名称</th>
                    <th>手机号</th>
                    <th>公司名称</th>
                    <th>地址</th>
                    <th>状态</th>
                    <th>添加时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <volist name="pages['lists']" id="fo">
                    <tr>
                        <td align="center">{$fo['id']}</td>
                        <td>{$fo['name']}</td>
                        <td>{$fo['mobile']}</td>
                        <td>{$fo['company_name']}</td>
                        <td>{$fo['address']}</td>
                        <td>
                            <if condition="$fo['status'] eq 1">
                                可用
                                <elseif condition="$fo['status'] eq 0"/>
                                不可用
                                <else/>
                                未知状态
                            </if>
                        </td>
                        <td>{$fo['add_time']|date="Y/m/d H:i",###}</td>
                        <td>
                            <a href="{:U('detail',array('id'=>$fo['id'],'tab'=>'audit'))}">查看详情</a> &nbsp;
                            <a href="{:U('audit_upd',array('id'=>$fo['id']))}">修改</a> &nbsp;
                            <a href="{:U('delete',array('id'=>$fo['id'],'tab'=>'audit'))}"
                               onclick="return confirm('确认删除吗？')">删除</a>
                            &nbsp;
                        </td>

                    </tr>
                </volist>
                <if condition="$pages['total'] eq 0">
                    <tr>
                        <td align="center" class="data-nothing" colspan="8">暂无相关信息</td>
                    </tr>
                </if>
                </tbody>
            </table>
            <!--列表-->

            <!--工具-->
            <div class="tableTools clearfix">
                <div class="tableOptions fl">
                </div>
                <div class="fr">
                    {$pages['show']}
                </div>
            </div>
            <!--工具-->
        </form>

    </div>

</div>
</body>
<script type="text/javascript">
    window.onload = function () {
        document.getElementById('search_btn').onclick = function () {
            var key = document.getElementById('key').value;
            location.href = "{:U('Seller/index')}?key=" + key;
        }
    }
</script>
</html>